---
title: update
---

import { Badge } from "@astrojs/starlight/components";
import CheckOption from "@partials/option/check.mdx";
import ConfigOption from "@partials/option/config.mdx";
import DependenciesOption from "@partials/option/dependencies.mdx";
import DependencyTypesOption from "@partials/option/dependency-types.mdx";
import DryRunOption from "@partials/option/dry-run.mdx";
import HelpOption from "@partials/option/help.mdx";
import LogLevelsOption from "@partials/option/log-levels.mdx";
import NoAnsiOption from "@partials/option/no-ansi.mdx";
import QuoteFilters from "@partials/tips/quote-filters.mdx";
import ShowOption from "@partials/option/show-list.mdx";
import SortOption from "@partials/option/sort.mdx";
import SourceOption from "@partials/option/source.mdx";
import SpecifierTypesOption from "@partials/option/specifier-types.mdx";
import TargetOption from "@partials/option/target.mdx";

Update to the latest versions on the npm registry.

## Examples

```bash
# Accept any update in latest (x.x.x)
syncpack update --target latest
# Only update minor versions (1.x.x)
syncpack update --target minor
# Only update patch versions (1.2.x)
syncpack update --target patch
# Check for outdated dependencies in one package
syncpack update --check --source 'packages/pingu/package.json'
# Update dependencies and devDependencies in the whole monorepo
syncpack update --dependency-types dev,prod
# Only update dependencies with a semver range specifier (^, ~, etc.)
syncpack update --specifier-types range
# Update dependencies where name exactly matches 'react'
syncpack update --dependencies 'react'
# Update dependencies where name contains 'react'
syncpack update --dependencies '**react**'
# Update dependencies with the '@aws-sdk' scope
syncpack update --dependencies '@aws-sdk/**'
# See more examples
syncpack update --help
# See a short summary of options
syncpack update -h
```

## Options

<QuoteFilters />

### --check

<CheckOption
  command="update"
  summary="List outdated dependencies instead of updating them and exit with a status code of 1 if updates are found."
/>

### --config <Badge text="<file-path>" />

<ConfigOption command="update" />

### --dependencies <Badge text="<dependency-name-pattern>" />

<DependenciesOption command="update" />

### --dependency-types <Badge text="<comma-separated-dependency-type-names>" />

<DependencyTypesOption command="update" />

### --dry-run

<DryRunOption command="update" />

### --log-levels <Badge text="<comma-separated-log-level-names>" />

<LogLevelsOption command="update" />

### --no-ansi

<NoAnsiOption command="update" />

### --source <Badge text="<file-pattern>" />

<SourceOption command="update" />

### --specifier-types <Badge text="<comma-separated-specifier-type-names>" />

<SpecifierTypesOption command="update" />

### --target <Badge text="<greediness>" />

<TargetOption command="update" />

### --help

<HelpOption command="update" />
